package com.zzh.model.factory;

/**
 * @author zhangzhihao
 * @email zhangzhihao@gongjiangren.net
 * @date 2020-11-14
 * @desc 工厂方法模式 感觉不值得用
 */
class FactoryTwoDemo{

    private FactoryTwoDemo(){}

    private static class FactoryDemoHolder{
        static FactoryTwoDemo factoryDemo = new FactoryTwoDemo();
    }
    public static FactoryTwoDemo getInstance()
    {
        return FactoryTwoDemo.FactoryDemoHolder.factoryDemo;
    }
}
